package com.iking.housekeeping.common;

import java.util.List;

import com.github.pagehelper.Page;

/**
 * 分页返回对象
 * 
 * @author: gf
 * @date: 2018年4月20日 上午11:24:25
 */
public class PageResult<T> {
	
	/**
	 * 总条数
	 */
	private Long totalNumber;
	
	/**
	 * 数据
	 */
	private List<T> dataList;
	
	public PageResult(Page<T> result) {
		this.totalNumber = result.getTotal();
		this.dataList = result.getResult();
	}

	public Long getTotalNumber() {
		return totalNumber;
	}

	public void setTotalNumber(Long totalNumber) {
		this.totalNumber = totalNumber;
	}

	public List<T> getDataList() {
		return dataList;
	}

	public void setDataList(List<T> dataList) {
		this.dataList = dataList;
	}

	@Override
	public String toString() {
		return "PageResult [totalNumber=" + totalNumber + ", dataList=" + dataList + "]";
	}
	

	
}
